<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./vue.js"></script>
  <link rel="stylesheet" href="animate.css">
  <style>
    .box{
      width:150px;
      height: 150px;
      background: rgb(189, 139, 31);
      margin:50px auto;
    }
   .ani-enter-active{
    animation:1s rotateInDownLeft;
   }
   .ani-leave-active{
    animation:1s rotateOutDownLeft;
   }
  </style>
</head>
<body>
  <div id="app">
    <button @click="isShow = !isShow">{{ isShow?'隐藏':'显示' }}</button>
    <transition name="ani">
      <div class="box" v-show="isShow"></div>
    </transition>
  </div>
  <script>
    let vm = new Vue({
      data:{
        isShow:false
      },
      el:"#app"
    })
  </script>
</body>
</html>